home *** CD-ROM | disk | FTP | other *** search
- Path: news1.h1.usa.pipeline.com!usenet
- From: grantp@usa.pipeline.com(Pete)
- Newsgroups: comp.lang.c++
- Subject: Re: Migrate & Compile C to C++ with MS Visual C++ 4.0 compiler
- Date: 2 Feb 1996 00:29:19 GMT
- Organization: Kalevi, Inc.
- Message-ID: <4erlsv$pb7@news1.usa.pipeline.com>
- NNTP-Posting-Host: pipe8.h1.usa.pipeline.com
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete)
- X-Newsreader: Pipeline USA v3.3.0
-
- On Feb 01, 1996 23:04:18 in article <Migrate & Compile C to C++ with MS
- Visual C++ 4.0 compiler>, 'mtmolin@srv.PacBell.COM (Miguel Molina)' wrote:
-
-
- >Help appreciated:
- >
- >I am moving some C programs to C++ and I am going to use
- >MS Visual C++ 4.0 to accomplish it. I have run into some
- >problems and I would appeciate if someone that has done this
- >can help.
- >
- >I am having problems recompiling the C code with this compiler.
- >I am trying to replace "malloc" containing statements with
- >"new". the compiler does not recognize "new" as a valid
- >identifier. I am not able to locate any meaningful information
- >in MS CDROM.
-
- C++ compiler doesn't recognize operator new?? Not a chance.
- Here's a possibility: Your files have extension .c. If so, the
- compiler assumes they are straight C files and invokes the
- compiler in C mode. To compile as a C++ file, change the
- file extension to .cpp.
-
- BTW, I thought there was an option as in BC++ systems that
- allows an override of this convention, but didn't find it. It's
- probably there somewhere.
-
- --
- Pete Grant
- Kalevi, Inc.
- Object Oriented Software Development
-